-
Notifications
You must be signed in to change notification settings - Fork 805
[2025-11 LWG Motion 14] P1789R3 Library Support for Expansion Statements #8482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
While applying the paper I noticed that we use the section title "Tuple interface" in [complex.tuple] and [array.tuple] instead. Shall we do the same here and rename [intseq.binding] to [intseq.tuple] along with "Tuple interface" as title? |
I'm personally fine with such inconsistency because |
|
Associated NB comment: https://github.com/cplusplus/nbballot/issues/584 |
| template<size_t I, class T, T... Values> | ||
| struct tuple_element<I, const integer_sequence<T, Values...>> { | ||
| using type = T; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't normally apply two-space indentation to definitions of classes. However, we're not consistent about that in general. There are definitions like struct nontype_t which are indented.
I don't think it needs to be fixed here, just something to keep in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to sometimes do that for short class definitions and empty classes (which would be the case for tuple_size directly above).
Currently tuple_element specializations for array, tuple and pair use 2-space indentation for the definition. Specializations for complex and ranges::subrange do not.
I've left it as is for now.
| }; | ||
|
|
||
| template<size_t I, class T, T... Values> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this separating blank line should exist. We normally specify overload sets without such separators. However, these are not function overloads, so it's a bit of an edge case.
Note that the synopsis does not have a blank line separator.
Thomas should make a judgment call here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the blank line to match synopsis. For ranges::subrange we do not have a newline between tuple_element specializations either, but we also do not have one after the tuple_size specialization (which imho does not help readability).
Fixes: #8473
Also fixes: cplusplus/papers#535
Also fixes https://github.com/cplusplus/nbballot/issues/584